<?php use_helper('Object') ?>

<div class="sf_admin_filters">
<?php echo form_tag('component/list', array('method' => 'get')) ?>

  <fieldset>
    <h2><?php echo __('filters') ?></h2>
    <div class="form-row">
    <label for="filters_productcode"><?php echo __('Product Code:') ?></label>
    <div class="content">
    <?php echo input_tag('filters[productcode]', isset($filters['productcode']) ? $filters['productcode'] : null, array (
  'size' => 15,
)) ?>
    </div>
    </div>

        <div class="form-row">
    <label for="filters_description"><?php echo __('Description:') ?></label>
    <div class="content">
    <?php echo input_tag('filters[description]', isset($filters['description']) ? $filters['description'] : null, array (
  'size' => 15,
)) ?>
    </div>
    </div>

        <div class="form-row">
    <label for="filters_category"><?php echo __('Category:') ?></label>
    <div class="content">    
    <?php echo select_tag('filters[category]', options_for_select(CommonValues::$gCompCategory['value'], isset($filters['category']) ? $filters['category'] : null, array( 'include_blank' => true)) ) ?>
    </div>
    </div>   
    


        <div class="form-row">
    <label for="filters_componenttype_id"><?php echo __('Type:') ?></label>
    <div class="content">
    <?php echo object_select_tag(isset($filters['componenttype_id']) ? $filters['componenttype_id'] : null, null, array (
  'include_blank' => true,
  'related_class' => 'ComponentType',
  'text_method' => '__toString',
  'control_name' => 'filters[componenttype_id]',
        'peer_method'=>'getSorted',
)) ?>
    </div>
    </div>

        <div class="form-row">
    <label for="filters_brand"><?php echo __('Brand:') ?></label>
    <div class="content">
    <?php echo input_tag('filters[brand]', isset($filters['brand']) ? $filters['brand'] : null, array (
  'size' => 15,
)) ?>
    </div>
    </div>

      </fieldset>

  <ul class="sf_admin_actions">
    <li><?php echo button_to(__('reset'), 'component/list?filter=filter', 'class=sf_admin_action_reset_filter') ?></li>
    <li><?php echo submit_tag(__('filter'), 'name=filter class=sf_admin_action_filter') ?></li>
  </ul>

</form>
</div>
